# 将[{},{},{}]数据转化为[(),(),()]
import json

from config import local_path


class JsonDataUtils:
    # 处理中文字符串乱码
    def get_data(self,data_file):
        with open(data_file, encoding='utf-8') as f:
            data_json = json.load(f)
        data = [tuple(d.values()) for d in data_json]
        return data

if __name__ == '__main__':
    json_data_utils = JsonDataUtils()
    data = json_data_utils.get_data(f'{local_path}/data/login.json')
    print(data)